<div class="suppliers index">
    <h2 class="left"><?php echo $html->image('iconos/suppliers.png');__('Proveedores'); ?></h2>
    <div class="actions specific">
        <ul>
            <li><?php echo $this->Html->link(__('Nuevo Proveedor', true), array('controller' => 'suppliers', 'action' => 'add')); ?>
            <li><?php echo $this->Html->link(__('Proveedores Inactivos', true), array('controller' => 'suppliers', 'action' => 'down')); ?> </li>
        </ul>
    </div>
    <table cellpadding="0" cellspacing="0">
        <tr>
<!--			<th><?php echo $this->Paginator->sort('Id', 'id'); ?></th>-->
            <th><?php echo $this->Paginator->sort('Nombre', 'name'); ?></th>
            <th><?php echo $this->Paginator->sort('Dueño', 'owner'); ?></th>
            <th><?php echo $this->Paginator->sort('Direccion', 'address'); ?></th>
            <th><?php echo $this->Paginator->sort('Correo', 'mail'); ?></th>
            <th><?php echo $this->Paginator->sort('Teléfono', 'phone'); ?></th>
            <th><?php echo $this->Paginator->sort('Celular', 'cellular'); ?></th>
<!--                        <th><?php echo $this->Paginator->sort('Fecha de Baja', 'termination_date'); ?></th>-->
            <!--                        Este ultimo renglon lo agregue despues de agregar el campo "termination date"-->
            <th class="actions"><?php __('Opciones'); ?></th>
        </tr>
        <?php
        $i = 0;
        foreach ($suppliers as $supplier):
            $class = null;
            if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
            }
            ?>
            <tr<?php echo $class; ?>>
    <!--		<td><?php echo $supplier['Supplier']['id']; ?>&nbsp;</td>-->
                <td><?php echo $supplier['Supplier']['name']; ?>&nbsp;</td>
                <td><?php echo $supplier['Supplier']['owner']; ?>&nbsp;</td>
                <td><?php echo $supplier['Supplier']['address']; ?>&nbsp;</td>
                <td><?php echo $supplier['Supplier']['mail']; ?>&nbsp;</td>
                <td><?php echo $supplier['Supplier']['phone']; ?>&nbsp;</td>
                <td><?php echo $supplier['Supplier']['cellular']; ?>&nbsp;</td>
    <!--                <td><?php echo $supplier['Supplier']['termination_date']; ?>&nbsp;</td>-->
                <!--                        Este ultimo renglon lo agregue despues de agregar el campo "termination date"-->              
                <td class="actions">
                    <?php echo $this->Html->link(__('Ver', true), array('action' => 'view', $supplier['Supplier']['id'])); ?>
                    <?php echo $this->Html->link(__('Editar', true), array('action' => 'edit', $supplier['Supplier']['id'])); ?>
                    <?php echo $this->Html->link(__('Dar Baja', true), array('action' => 'baja', $supplier['Supplier']['id']), null, sprintf(__('Esta seguro que desea dar baja a # %s?', true), $supplier['Supplier']['name'])); ?>
                    <?php echo $this->Html->link(__('Eliminar', true), array('action' => 'delete', $supplier['Supplier']['id']), null, sprintf(__('Esta seguro que desea eliminar el proveedor # %s?', true), $supplier['Supplier']['name'])); ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
    <p>
        <?php
        echo $this->Paginator->counter(array(
            'format' => __('Página %page% de %pages%, mostrando %current% registros de %count% en total, a partir del registro %start%, terminando en el %end%', true)
        ));
        ?>	</p>

    <div class="paging">
        <?php echo $this->Paginator->prev('<< ' . __('anterior', true), array(), null, array('class' => 'disabled')); ?>
        | 	<?php echo $this->Paginator->numbers(); ?>
        |
        <?php echo $this->Paginator->next(__('siguiente', true) . ' >>', array(), null, array('class' => 'disabled')); ?>
    </div>
</div>